function s1_hello() {
        echo "hello, world!"
}

function s2_tell_who_i_am() {
	echo "$(whoami)"
}

function s3_which_distro_do_i_use(){
	if [ -f /etc/os-release ]; then
		source /etc/os-release
		echo "NAME=\"$NAME\""
	elif [ -f /etc/centos-release ]; then
		local centos_version=$(cat /etc/centos-release)
		echo "NAME=\"$centos_version\""
	elif [ -f /etc/redhat_release ]; then
		local redhat_version=$(cat /etc/redhat-release)
		echo "NAME=\"Unknown Linux Distribution\""
	fi
}

function s4_view_my_cpu_arch(){
	local arch=$(uname -m)

	case "$arch" in
		"x86_64") echo "x86_64" ;;
		"i386"|"i686") echo "x86_32" ;;
		"armv7l") echo "ARM32" ;;
		"arch64") echo "ARM64" ;;
		*) echo "$arch" ;;
	esac
}

function s5_show_first_scsi_disk_size(){
	local size=$(lsblk -b -l | grep '^sda ' | awk '{print $4}')
	if [ -z "$size" ]; then
		size=$(lsblk -b -l | rep 'disk' | head -1 | awk '{print $4}')
	fi
	if [ -n "$size" ]; then
		echo $((size / 1024 / 1024))
	else
		echo "0"
	fi
}

function s6_show_main_memory_size_in_megabytes(){
	local mem_kb=$(grep MemTotal /proc/meminfo | awk '{print $2}')
	echo $((mem_kb / 1024))
}
